package com.common.app.listener

import android.content.Context
import com.common.app.adapter.GridImageAdapter
import com.luck.picture.lib.entity.LocalMedia
import com.luck.picture.lib.interfaces.OnExternalPreviewEventListener

/**
 *
 * 作者：sosou
 *
 * 版本：1.0
 *
 * 创建日期：2025/10/1
 *
 * 描述：外部预览监听事件
 *
 * 修订历史：
 *
 */
class MyExternalPreviewEventListener(adapter: GridImageAdapter) : OnExternalPreviewEventListener {
    private val adapter: GridImageAdapter

    init {
        this.adapter = adapter
    }

    override fun onPreviewDelete(position: Int) {
        adapter.remove(position)
        adapter.notifyItemRemoved(position)
    }

    override fun onLongPressDownload(context: Context?, media: LocalMedia?): Boolean {
        return false
    }
}